package com.cskaoyan.controller.front.goods;

import com.cskaoyan.bean.vo.back.BaseRespVo;
import com.cskaoyan.bean.vo.front.goodsvo.GoodsIndexVo;
import com.cskaoyan.service.front.goods.WxGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: SSMItem
 * @description 该controller为实现进入主页面显示商品信息
 * @author: YY
 * @create: 2022-10-13 23:08
 **/
@RestController
@RequestMapping("wx/home")
public class WxHomeController {

    @Autowired
    WxGoodsService wxGoodsService;

    /**
     * 进入商城首页显示所有信息
     * @return
     */
    @GetMapping("index")
    public BaseRespVo wxIndex() {
        GoodsIndexVo goodsIndexVo = wxGoodsService.selectTables();
        return BaseRespVo.ok(goodsIndexVo);
    }

}
